package com.tlm.rabbitmqconsumer;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
    @Autowired
    private AmqpTemplate amqpTemplate;
    @GetMapping("testMq")
    public void testMq(){
        amqpTemplate.convertAndSend("tianlimin","下单信息");
    }
}
